<?php
print_r(defined("IN_OP"));
if (!defined("IN_OP"))
{
    exit("You can't access this file directly...");
}
$user = new User();
$curruser = $user->getuser();
$conf = new Config();
$DATAEXPIRYDAY3 = $conf->Get("news_en");
if (0 < substr_count($DATAEXPIRYDAY3, ";"))
{
    $moredoc = explode(";", $DATAEXPIRYDAY3);
    $DATAEXPIRYDAY3 = "";
    $i = 0;
    while ($i < count($moredoc))
    {
        $DATAEXPIRYDAY3 .= $moredoc[$i] . "<br>";
        ++$i;
    }
}
$ccc = "系统管理员";
if (0 < $curruser['prev_id'])
{
    $ccc = "公司管理员";
}
$rs = getdb("select id from k_user where acl=5 and supe_account='" . $curruser['account'] . "'");
if (!$rs->eof)
{
    $ccc = "大股东总监";
}
$rs->close();
$newmsg = trim($conf->Get("news_th"));
$newmsg = str_replace("\r\n", "", $newmsg);
$tmd = new tmd_tpl();
$tmd->assign('DATAEXPIRYDAY3', $DATAEXPIRYDAY3);
$tmd->assign('ccc', $ccc);
$tmd->assign('userName', $curruser['name']);
if ($newmsg != "")
{
    $tmd->assign('newmsg', '<script>alert("' . $newmsg . '")</script>');
}
$tmd->display('admin/login');